UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/JRgilUm00hgAN5+mBUEbIRJ65cizeLd8bLuio9trxQ='
WHERE
key_id = '775b28930d99ebe73af30a595279b05d8fc16f06a0681958c78ae5ecd48dbeeb'
AND (
token = '/JRgilUm00hgAN5+mBUEbIRJ65cizeLd8bLuio9trxQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)