UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hf6OyYYHaQqqs9omuiXV6XDyIev4bD2elbz0PlJn128='
WHERE
key_id = '53c046742f6f6808f55755eb5bdb2500f6b5a4119a6bce38cee3d943e47c9a83'
AND (
token = 'hf6OyYYHaQqqs9omuiXV6XDyIev4bD2elbz0PlJn128='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)