UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VZ/MpDZuWsOwCDvj4k8NWC2i7kwGhjTPSVU1eH8lwWY='
WHERE
key_id = '0fcb155b78d1e6955c85d2a20c8b8ef611dda5a5be0f04087c126fc426ed7318'
AND (
token = 'VZ/MpDZuWsOwCDvj4k8NWC2i7kwGhjTPSVU1eH8lwWY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)