UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kxCjYtKMxR8cpkYqnF2AK9l2zr/EWC9Nmncti4zaOqk=' 
WHERE 
  key_id = '19f7eca8844b2f80aca24ebe98f919c00aaeadfc6de39f7137b533908349f2b8' 
  AND (
    token = 'kxCjYtKMxR8cpkYqnF2AK9l2zr/EWC9Nmncti4zaOqk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030