UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'luvhNlbVNNkwsGsThjNKLpTVgfXjvKnMP5hgTO2OgUM='
WHERE
key_id = 'e82d900aa05f99bc2462dc0b33be644657fd0fe44c559fbddb7dd631938a1fc6'
AND (
token = 'luvhNlbVNNkwsGsThjNKLpTVgfXjvKnMP5hgTO2OgUM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)