UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'mL0ICEbQQEe/G7Kp+WtxvEdoPTy5fSdznhpp5g5MTZg=' 
WHERE 
  key_id = '7c899ae37c090a2b2e801f920e718ea4c095f2eb8f8f53c058bf8d5cea329579' 
  AND (
    token = 'mL0ICEbQQEe/G7Kp+WtxvEdoPTy5fSdznhpp5g5MTZg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024