UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'yzoEB+HYvcG1HpQB6jbzQqKMiZUbeKiOkHvH58pQQPQ=' 
WHERE 
  key_id = 'fd499581566dd042d109b56e4fc0e151be272183fa6c735cce67fdffa30c7c5e' 
  AND (
    token = 'yzoEB+HYvcG1HpQB6jbzQqKMiZUbeKiOkHvH58pQQPQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030