UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oiY7354x4YS5sSSKkcFzGo1KGJdQj7XlsIx1irHp2So='
WHERE
key_id = '65c5e64f17018d1cd83d4886ec20de9f5efc5ec3cf3cdb310cbce043b32e5153'
AND (
token = 'oiY7354x4YS5sSSKkcFzGo1KGJdQj7XlsIx1irHp2So='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)