UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eefYhozdCqXmQt33sTookjXYNGKeFULVmQKV8W0EUXU='
WHERE
key_id = 'ce3a092cca90b11d7cb4c0a433d38362a7652f49dd72edf10b36f38e9bf176b9'
AND (
token = 'eefYhozdCqXmQt33sTookjXYNGKeFULVmQKV8W0EUXU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)