UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eGQOnOgm15/Te4g/d/8VRVMXYImPL2F7dvC2ImRVE4Y='
WHERE
key_id = '291dbba1752b05128ef086396e28622111a2a98c2b88bbceca71caa4e9736c39'
AND (
token = 'eGQOnOgm15/Te4g/d/8VRVMXYImPL2F7dvC2ImRVE4Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)