UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nlhFYzmntE/ZTcCYG77wMN2fHZqVHGlet1hievdfumw='
WHERE
key_id = '2110a45d6cd6d703e500fd334313b118024dafc20fabeab2142bc57eb3ab7fdd'
AND (
token = 'nlhFYzmntE/ZTcCYG77wMN2fHZqVHGlet1hievdfumw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)