UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'U29Y3/1Te20gLtTzBlJJC6zrtwjhT8kmP4PaQjcoZ3o='
WHERE
key_id = '36d91c9f1a831bf1522e0f5c6a266ed622ccdf79f2ff6bd95dc5b7f520a05a83'
AND (
token = 'U29Y3/1Te20gLtTzBlJJC6zrtwjhT8kmP4PaQjcoZ3o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)