UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'fSthmgLfrYOZ0vzAxYdUuwwdWLFZrBxe+PkJ+ZyMHi0=' 
WHERE 
  key_id = '10b0b4e99b9b6a4964d3352c61304047b1f18c054eae87aaab58653ba9a1d0bc' 
  AND (
    token = 'fSthmgLfrYOZ0vzAxYdUuwwdWLFZrBxe+PkJ+ZyMHi0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047