UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jax7+IzPT1e1BlgMWEjujxBYJKBB+RxlPL5lLm1qOls='
WHERE
key_id = '09d107c9bca6020c233a7cebb736eba3058c8b10408dd4d3d6b536e7131f89c2'
AND (
token = 'jax7+IzPT1e1BlgMWEjujxBYJKBB+RxlPL5lLm1qOls='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)