UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qTvIFURVAZDvIapyD7kHXJ7WTrEhepuBukROLjuH02M='
WHERE
key_id = '757c73e8a467aa6dc8f881c7f31cc88641d47e8eade5c8f5c55bc68f2d72cc26'
AND (
token = 'qTvIFURVAZDvIapyD7kHXJ7WTrEhepuBukROLjuH02M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)