UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4/WvYMotWpdjwgP/4PSOzHxE2mZ+0tPln92CB6rmnII='
WHERE
key_id = 'a61c4ab83b929af74c0f98bc69c7e68d04e7557d1a7743b07cbc6994739d28d3'
AND (
token = '4/WvYMotWpdjwgP/4PSOzHxE2mZ+0tPln92CB6rmnII='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)