UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Hrk+8nmIDLsTqUHfii2zwYKOU49ffdbIquKJBm9u8Ho=' 
WHERE 
  key_id = 'eb9c3ceaa454e07a3fc5ea52a39d0b650ea573ef12d6d01f264d7887cf4ac76b' 
  AND (
    token = 'Hrk+8nmIDLsTqUHfii2zwYKOU49ffdbIquKJBm9u8Ho=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018