UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'gZneGO4hiuNRICXj15VU+ZezLUv8bR+zV/ejZOE1e5E='
WHERE
key_id = '2db3b96993cb8fbade175159b45407634d9d8c6da3ab3568f30674bcc0576601'
AND (
token = 'gZneGO4hiuNRICXj15VU+ZezLUv8bR+zV/ejZOE1e5E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)