UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oVX8/qbUpD/mUZ58B13B5XCbdeGQPh7uunihSOoYOvA='
WHERE
key_id = '72b859556f69e0c84b13356401c72c4d66d2c2d07ab7dbe886de2d51ecdb39e8'
AND (
token = 'oVX8/qbUpD/mUZ58B13B5XCbdeGQPh7uunihSOoYOvA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)