UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'F3ZmS+beQ474C9bfKV0PsS2YlsDzK5e+PXnNi6uJpnI=' 
WHERE 
  key_id = 'a291a8c9c71e627741d85ed7f0fb7820d6eaee656edeeba20bb9446946def538' 
  AND (
    token = 'F3ZmS+beQ474C9bfKV0PsS2YlsDzK5e+PXnNi6uJpnI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00017