UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'hwFMsACf42GAyvB00FqC6fYlnR2nKWyrjO9ExxmbqlE='
WHERE
key_id = '115d7a20104dcb455241a4b4cde7b08f5afd3c06d33e3a6a22b1c79310a43411'
AND (
token = 'hwFMsACf42GAyvB00FqC6fYlnR2nKWyrjO9ExxmbqlE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)