UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 't9iOEpVjZrf/yqNCh/RjqD1nNiGeI/0Ep7zm+tBL8OY='
WHERE
key_id = 'dab2f7bb7280aa569da7aa7a2a4cd7c32ccfd450d42125ba49f4c5fa733dfc53'
AND (
token = 't9iOEpVjZrf/yqNCh/RjqD1nNiGeI/0Ep7zm+tBL8OY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)