UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ds//KeghR4Xitx/VW+oJ1o7k3U9gQ1WuqbJID6jYbDA='
WHERE
key_id = 'f0b088d8f675aff9d0d233e5b2351c1a9831a9c8d7b88a915a7e137952d186c6'
AND (
token = 'ds//KeghR4Xitx/VW+oJ1o7k3U9gQ1WuqbJID6jYbDA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)