UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XMf+q01oK3k13QgpXqMl/Re+H3MmSv8fkSql8lOlRlg='
WHERE
key_id = '889f9637cf1ca7c4f9072e3d110c0491b62f13d9ca933ba6bddccf7c536e54bd'
AND (
token = 'XMf+q01oK3k13QgpXqMl/Re+H3MmSv8fkSql8lOlRlg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)