UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8LbQjVCBD8U5fv7w+B4i8oLvMvWIcpWd9+F1SY6AXFg='
WHERE
key_id = '7af6e2bcbaf6c3c699137628145acea2dac1711ce3c1938f73d9906639409b72'
AND (
token = '8LbQjVCBD8U5fv7w+B4i8oLvMvWIcpWd9+F1SY6AXFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)