UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Di63TAxg4qWfd8Sm5ItXapgXeIH2VZg4MIjjvLiobQQ='
WHERE
key_id = '72e9b6c1a332a7096a02bac94d98be782313401737db2efaea9af674efe9c44b'
AND (
token = 'Di63TAxg4qWfd8Sm5ItXapgXeIH2VZg4MIjjvLiobQQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)