UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uhg1neF54bLNluaM2HiZvI9ca5WmVKGCqKkLLzlReyU='
WHERE
key_id = '5c85bc8a19e1b8c9be1de1ff4323273279119321d7da633095056964fce818cc'
AND (
token = 'uhg1neF54bLNluaM2HiZvI9ca5WmVKGCqKkLLzlReyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)