UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mFTwhvQMLvo21ra2I//Z1LzNwJxVU2DsJWG5Qc99CNg=' 
WHERE 
  key_id = '0405e63a029c09d9fe26e8d769074b626455ca299599e4a4e35d496982077cb6' 
  AND (
    token = 'mFTwhvQMLvo21ra2I//Z1LzNwJxVU2DsJWG5Qc99CNg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033