UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'v+iykVGG/UkKbZaNoteXIE81XTjDFYfNW5/8tRsgB60='
WHERE
key_id = '6a7098e7575a6ddb2b5ede0506db84b004a1857ff65ac9cf0a9ac590f53fce55'
AND (
token = 'v+iykVGG/UkKbZaNoteXIE81XTjDFYfNW5/8tRsgB60='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)