UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UVA8xkY/I+kHFfXDlYRPvlOGItvCmAri9SwbJdbyyEQ='
WHERE
key_id = '72f2613168fd13956e90de962c480f390b66f10decd8308d16fecc8ebdf8abfb'
AND (
token = 'UVA8xkY/I+kHFfXDlYRPvlOGItvCmAri9SwbJdbyyEQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)