UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'C/lZCFT5AET7kNP9YHD/d8LI2U2XqW/l6fgm+gBjL44='
WHERE
key_id = '904ed9be43efe1ef3bd8ec67171431fd1718c7bc132960d13d8b7521b0583253'
AND (
token = 'C/lZCFT5AET7kNP9YHD/d8LI2U2XqW/l6fgm+gBjL44='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)