UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Pjq60v7CXLnQEGcPx2ZdcdOt8mTCde9VPE5a0rEujCY=' 
WHERE 
  key_id = 'c2ebe3631adb559ae382e89435362c7790572f0e7428b9215076ba33bc18b5fa' 
  AND (
    token = 'Pjq60v7CXLnQEGcPx2ZdcdOt8mTCde9VPE5a0rEujCY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033