UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tlERXCisnHGFuwT/nxZK7KgXlxO3U2DxstLcKZvRIBQ='
WHERE
key_id = 'bbf7418af6168477c9cd8de43c0850805e62214033a65168c6ddb0ce3b2e4b9c'
AND (
token = 'tlERXCisnHGFuwT/nxZK7KgXlxO3U2DxstLcKZvRIBQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)