UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EeaIwSDaqLQHTvlIgGwfeeszA8q51SFCOu61lkxV8/c='
WHERE
key_id = '10bb1277a9973c79e2c56609c885e06bdeed1805688ebefc155e55a465c37891'
AND (
token = 'EeaIwSDaqLQHTvlIgGwfeeszA8q51SFCOu61lkxV8/c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)