UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/07QGdx9FaztK0jSB8B8ro/r7dzT5l1mytKVNMLxgLo=' 
WHERE 
  key_id = '9b3ca4f11dc8f024c3fc86cd64e6324fddc7167755f08a957a01c37b13d1e064' 
  AND (
    token = '/07QGdx9FaztK0jSB8B8ro/r7dzT5l1mytKVNMLxgLo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024