UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/fuRc6/Gz+c5o9qGD9vR7S6U5fPvKawGo5N3+je6QRo='
WHERE
key_id = '303948a0d8473b2b484a63a61d22cabfc763bec2e859ec3f9c45c8014ccd1384'
AND (
token = '/fuRc6/Gz+c5o9qGD9vR7S6U5fPvKawGo5N3+je6QRo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)