UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zCBuSstUgEZErsWTWjYjIefYd77/MTxa5oeZpSLORdY=' 
WHERE 
  key_id = '0e7441037a588c0dbfc9d0b51167becae32dea45f4f1e0472bf2b0d7b316e473' 
  AND (
    token = 'zCBuSstUgEZErsWTWjYjIefYd77/MTxa5oeZpSLORdY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027