UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'imFBAU26DyOVBbY9AnlJgHEupNKtko9u3HyNbF4Ga8U='
WHERE
key_id = '192baba18f1cc1e71a7ae2a001d7c16b1b127e64e6e44a0920b12b77cdcbb459'
AND (
token = 'imFBAU26DyOVBbY9AnlJgHEupNKtko9u3HyNbF4Ga8U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)