UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fx+twxBvLO8YjGjy3kYyRbWmOsa0m4zvgHdVwxLb9bY=' 
WHERE 
  key_id = '5f7446a8d2b5c68debe7de36a5a93e8f085379bdaf12c0b63ac571bbec7c2436' 
  AND (
    token = 'Fx+twxBvLO8YjGjy3kYyRbWmOsa0m4zvgHdVwxLb9bY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00072