UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+7MsoHkm4/lVYuDMYh/0FL/stO157EIdmbOY9aYU/8w='
WHERE
key_id = '96c463f710507a949579ec92bf8cc0fb43a9763093a6612fe83541959cdde9ae'
AND (
token = '+7MsoHkm4/lVYuDMYh/0FL/stO157EIdmbOY9aYU/8w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)