UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x1I+Z0ofef9wWVGumxmNlVu1OsooxW/30LmQm8zYsmc='
WHERE
key_id = '725204865f0f76f054c3d22bb2bf8ba1f9b82d395be9ce9ff00d779c8eedd976'
AND (
token = 'x1I+Z0ofef9wWVGumxmNlVu1OsooxW/30LmQm8zYsmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)