UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VlHu/gZ+TvnUItcy8G6b6wZyEVB3TQbKmUiBf1WUPy0='
WHERE
key_id = '01f3606d223b15312b755b25cab3c0e6272efc71257e0becbb725da8b97c2b52'
AND (
token = 'VlHu/gZ+TvnUItcy8G6b6wZyEVB3TQbKmUiBf1WUPy0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)