UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'uel9+ZckWdflFV0X3KwUdbbPsk+0oOdFdMfExk1SfZs=' 
WHERE 
  key_id = '93f96c2cb910f4502c9b0973940f77a243b9ee0a5aa1e36790fd8ec11451e3e6' 
  AND (
    token = 'uel9+ZckWdflFV0X3KwUdbbPsk+0oOdFdMfExk1SfZs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018