UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '+RxcCqaQ4NE5CPDEe9ZABFfvqo8xQ2RKYgZpoHksF/A=' 
WHERE 
  key_id = '9204820e5e22749f4a451bc820b1d2c7657cbf23cc6a2ca4382e8a53a163dabc' 
  AND (
    token = '+RxcCqaQ4NE5CPDEe9ZABFfvqo8xQ2RKYgZpoHksF/A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00055