UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eUIc1vAFnfIG5d553XtBA9NYyM1JE18rQr9EQ9U2l74=' 
WHERE 
  key_id = '9a2369a1893a9278cd1fa118eefc9e95eaf17ac2fad7c1a2546ffbf5db8843e5' 
  AND (
    token = 'eUIc1vAFnfIG5d553XtBA9NYyM1JE18rQr9EQ9U2l74=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029