UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RebxQFEIrakz45VScvB8uUqtCU4WbIhocLVBd8V/89o='
WHERE
key_id = '73260b40380bb127df662d7d8b214318b61e8099fab426535466f6f139e15496'
AND (
token = 'RebxQFEIrakz45VScvB8uUqtCU4WbIhocLVBd8V/89o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)