UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/B5ipXIcqSy4i4Ttlq1vivPKISBfqXaKlayVwKfaBjg='
WHERE
key_id = '3c00011c51d2bca113ff63f492cd1cbb615a1f10373a889f89082fd5fcdc7892'
AND (
token = '/B5ipXIcqSy4i4Ttlq1vivPKISBfqXaKlayVwKfaBjg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)