UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'lrSZV0flvtaRfrz6+sik8xCD0cLlLbUrsKXaHJKaXng='
WHERE
key_id = '257cab5ec7c4f4d34f72c7faa217cff0f46afc6c6d6dbc0d037621483cd6c005'
AND (
token = 'lrSZV0flvtaRfrz6+sik8xCD0cLlLbUrsKXaHJKaXng='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)