UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Tss3R4MRqQoqYgrwqc80Xv+YhAe2qhlQGwy+Dl3PujA=' 
WHERE 
  key_id = 'f95e5d60f028197bdfd3af9ec3ba52f05180a31b7626abe3c6ecbe95da3dbd8d' 
  AND (
    token = 'Tss3R4MRqQoqYgrwqc80Xv+YhAe2qhlQGwy+Dl3PujA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00048