UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hyyjxS9f+aRXsksDYSDnbGy4WdBgKQHsMGccRSMN3z0='
WHERE
key_id = '93db9257475e4415fb68e8c309adac783837cf3c25966b80e01ec2eb8fbf7345'
AND (
token = 'hyyjxS9f+aRXsksDYSDnbGy4WdBgKQHsMGccRSMN3z0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)