UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '727QfBqjVCkQC4ljRKqklq8oCzQwdhDBQ0PwNTdDuZg=' 
WHERE 
  key_id = '8b3d1d98568b289e45c90d06138200a0ec8eaad73588814774fca24fd7719b1c' 
  AND (
    token = '727QfBqjVCkQC4ljRKqklq8oCzQwdhDBQ0PwNTdDuZg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030