UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FVdX3jJqkH0BHOXmVg42tTdlQLmbvRwN2quGQ382QIY='
WHERE
key_id = '232868f33f42344330ca9d6553b08cdada9502ac77a7fe18b85a5619e98266c0'
AND (
token = 'FVdX3jJqkH0BHOXmVg42tTdlQLmbvRwN2quGQ382QIY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)