UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9PNSlPuGIy/830Oqq327YBla8zlj47B03NxxjL9WBXE='
WHERE
key_id = '0b26caaf1ba85e371f6c61ab9acccdba079e59df8868b60a85b8bc87342c18c6'
AND (
token = '9PNSlPuGIy/830Oqq327YBla8zlj47B03NxxjL9WBXE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)