UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WStR6g6ff5DpNWQGt0l0JE+H6yUCvwV1dOb9ZunP1x4='
WHERE
key_id = '19095f98ca290110441d7cfb62d22fbddd01800a9fde95dc5db3c4b5efc57792'
AND (
token = 'WStR6g6ff5DpNWQGt0l0JE+H6yUCvwV1dOb9ZunP1x4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)