UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C3XfTdnDx/A9lHIhtJ3cjirEs93eb3oSiARskj3Z8MI='
WHERE
key_id = '4188a17a89ce1b53122bb446d9b1c677a15dbe18e32aadc303c02d8f4f08a03f'
AND (
token = 'C3XfTdnDx/A9lHIhtJ3cjirEs93eb3oSiARskj3Z8MI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)