UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kfEkb49w8R4Z9/LBWX5RUDwqhgY/foxP00IPjSjP4SA='
WHERE
key_id = '9aa49213e26af58445a72096d6302238905e0dea77b3ae1965881ae5ad6e5c70'
AND (
token = 'kfEkb49w8R4Z9/LBWX5RUDwqhgY/foxP00IPjSjP4SA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)