UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sbIDSQ4ovi8YUHicT+z4HBcDfLK1r2AXHMlOxGFGC7M='
WHERE
key_id = '61032994a523708dbc29db03d3c516028d344e72b65ea5fba516a6646442fb70'
AND (
token = 'sbIDSQ4ovi8YUHicT+z4HBcDfLK1r2AXHMlOxGFGC7M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)